package com.yigang.homecontroller;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.yigang.service.ProductService;

@Controller
public class YanghuojiController {
	@Autowired
	private ProductService productService;
	@RequestMapping("/yanghuo")
	public String yanghuoJi(Model model,HttpSession session) {
		
		List<Map<String, Object>> listyanghuojipage = productService.getAllpage();
		List<Map<String, Object>> listyanghuojichanel = productService.getAllChanel();
		System.out.println(listyanghuojipage);
		System.out.println(listyanghuojichanel);
		model.addAttribute("listyanghuojipage", listyanghuojipage);
		model.addAttribute("listyanghuojichanel", listyanghuojichanel);
		return "jsp/home/yanghuoji";
		
	}
}
